<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    {block name="title"}<title>{$Think.config.system_name}</title>{/block}
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />

    <link rel="shortcut icon" href="__IMAGES__/favicon.png" type="image/x-icon" />
    <link rel="stylesheet" href="__CSS__/font.css">
    <link rel="stylesheet" href="__CSS__/xadmin.css">
    <link rel="stylesheet" href="__CSS__/font-awesome.min.css">
    {block name="css"}{/block}
</head>
<body>
<!-- 顶部开始 -->
<div class="container">
    <div class="logo"><a href="./index.html">{$Think.config.system_name}</a></div>
    <div class="left_open">
        <i title="展开左侧栏" class="iconfont">&#xe699;</i>
    </div>
    <ul class="layui-nav left fast-add" lay-filter="">
        <li class="layui-nav-item">
            <a href="javascript:;">快捷菜单</a>
            <dl class="layui-nav-child"> <!-- 二级菜单 -->
                <dd><a onclick="x_admin_show('添加合同','{:url(\'admin/contract/add\')}')"><i class="fa fa-plus-circle"></i>合同录入</a></dd>
                <dd><a onclick="x_admin_show('添加客户','{:url(\'admin/customer/add\')}')"><i class="fa fa-user-plus"></i>添加客户</a></dd>
            </dl>
        </li>
    </ul>
    <ul class="layui-nav right" lay-filter="">
        <li class="layui-nav-item">
            <a href="javascript:;">{$user_info['username']}</a>
            <dl class="layui-nav-child"> <!-- 二级菜单 -->
                <dd><a onclick="x_admin_show('个人信息','{:url("adminUser/info")}', 600, 400)">个人信息</a></dd>
                <dd><a onclick="x_admin_show('个人信息','{:url("adminUser/edit_passwd")}', 600, 400)">密码修改</a></dd>
                <dd><a onclick="logout()">退出</a></dd>
            </dl>
        </li>
    </ul>
</div>
<!-- 顶部结束 -->

<!-- 中部开始 -->

<!-- 左侧菜单开始 -->
{block name="menu"}{/block}
<!-- 左侧菜单结束 -->

<!-- 右侧主体开始 -->
{block name="body"}{/block}
<!-- 右侧主体结束 -->

<!-- 中部结束 -->


<!-- 底部开始 -->
<div class="footer">
    <div class="copyright">Copyright ©2018 CT All Rights Reserved</div>
</div>
<!-- 底部结束 -->

<!--js脚本-->
<script type="text/javascript" src="__JS__/jquery.min.js"></script>
<script src="__JS__/lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="__JS__/xadmin.js"></script>
{block name="js"}{/block}

<script>
    function logout() {
        $.ajax({
            type: "post",
            url: "{:url('admin/login/logout')}",
            dataType: "json",
            success: function(data){
                if (data.code == 1) {
                    layer.msg(data.msg,{icon:5,time:1500});
                } else {
                    layer.msg('退出成功', {
                        icon:6,
                        time: 1000,//1s关闭
                    }, function () {
                        location.href="{:url('admin/index/index')}"
                    });
                }
            }, error: function(){
                layer.msg("请求出错",{icon:5,time:1000});
            }
        });
    }
</script>
</body>
</html>